package pers.jason.wppm.security.core.validate.code.processor;

import org.springframework.web.context.request.ServletWebRequest;

import pers.jason.wppm.security.core.validate.code.exception.ValidateCodeException;

/**
 * 验证码处理器
 * @author Jason
 * @Date 2018-11-01 15:10
 *
 */
public interface ValidateCodeProcessor {

	/**
	 * 返回生成的验证码
	 * @param request
	 * @throws Exception
	 */
	void responseValidateCode(ServletWebRequest request) throws Exception;
	
	/**
	 * 校验验证码是否正确
	 * @param request
	 */
	void validateCode(ServletWebRequest request) throws ValidateCodeException;
	
}
